From 336d4c03df039b56dd3dc10587bfbe47d031b64b Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 19 Jan 2005 03:19:56 +0000 Subject: [PATCH] If we don't have a name on the way in, give it a shortname. --- gpsbabel/route.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpsbabel/route.c b/gpsbabel/route.c index 0f0733087..4f3b82428 100644 --- a/gpsbabel/route.c +++ b/gpsbabel/route.c @@ -100,6 +100,11 @@ route_add_wpt(route_head *rte, waypoint *wpt) ENQUEUE_TAIL(&rte->waypoint_list, &wpt->Q); rte->rte_waypt_ct++; /* waypoints in this route */ rte_waypts++; /* total waypoints in all routes */ + if (wpt->shortname == NULL) { + char tmpnam[10]; + snprintf(tmpnam, sizeof(tmpnam), "RPT%03d",rte_waypts); + wpt->shortname = xstrdup(tmpnam); + } } void -- 2.30.2